package com.zz.parkingsystem.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 流水表
 * @TableName t_fund_flow
 */
@Data
public class FundFlow implements Serializable {
    /**
     * 资金流水id
     */
    private Integer ffId;

    /**
     * 订单项id
     */
    private Integer oiId;

    /**
     * 支付方式
     */
    private Integer paidType;

    /**
     * 0:资金进账  1:资金出账
     */
    private Integer fundType;

    /**
     * 操作金额
     */
    private BigDecimal operatorAmount;

    /**
     * 处理时间
     */
    private Date operatorTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FundFlow other = (FundFlow) that;
        return (this.getFfId() == null ? other.getFfId() == null : this.getFfId().equals(other.getFfId()))
            && (this.getOiId() == null ? other.getOiId() == null : this.getOiId().equals(other.getOiId()))
            && (this.getPaidType() == null ? other.getPaidType() == null : this.getPaidType().equals(other.getPaidType()))
            && (this.getFundType() == null ? other.getFundType() == null : this.getFundType().equals(other.getFundType()))
            && (this.getOperatorAmount() == null ? other.getOperatorAmount() == null : this.getOperatorAmount().equals(other.getOperatorAmount()))
            && (this.getOperatorTime() == null ? other.getOperatorTime() == null : this.getOperatorTime().equals(other.getOperatorTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFfId() == null) ? 0 : getFfId().hashCode());
        result = prime * result + ((getOiId() == null) ? 0 : getOiId().hashCode());
        result = prime * result + ((getPaidType() == null) ? 0 : getPaidType().hashCode());
        result = prime * result + ((getFundType() == null) ? 0 : getFundType().hashCode());
        result = prime * result + ((getOperatorAmount() == null) ? 0 : getOperatorAmount().hashCode());
        result = prime * result + ((getOperatorTime() == null) ? 0 : getOperatorTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ffId=").append(ffId);
        sb.append(", oiId=").append(oiId);
        sb.append(", paidType=").append(paidType);
        sb.append(", fundType=").append(fundType);
        sb.append(", operatorAmount=").append(operatorAmount);
        sb.append(", operatorTime=").append(operatorTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}